package com.zmn.oms.persistence.interfaces.review;

import com.zmn.oms.model.entity.review.OmsOrderReview;
import com.zmn.oms.model.entity.review.OrderReviewDbQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName OmsOrderReviewDao
 * @description:
 * @author: wangyanci
 * @create: 2021-08-06 17:19
 * @Version 1.0
 **/
public interface OmsOrderReviewDao {

    OmsOrderReview findOmsOrderReviewByKey(@Param("reviewId") Long reviewId, @Param("orderId") Long orderId);

    OmsOrderReview findOmsOrderReviewByOrderIdAndWorkIdAndType(@Param("orderId") Long orderId, @Param("workId") Long workId, @Param("reviewType") Integer reviewType);

    OmsOrderReview findOmsOrderReviewByQuery(OrderReviewDbQuery orderReviewDbQuery);

    int insertOmsOrderReview(OmsOrderReview omsOrderReview);

    int updateByPrimaryKeySelective(OmsOrderReview omsOrderReview);

    List<OmsOrderReview> getOmsOrderReviewByOrderIdsAndType(@Param("orderIds") List<Long> orderIds, @Param("reviewType") int reviewType);

    List<OmsOrderReview> listOrderReviewByOrderIdList(@Param("orderIds") List<Long> orderIdList);

    void deleteById(OmsOrderReview deleteOrderReview);
}
